﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.ServiceModel.Web;
using System.Text;
using System.Data.SqlClient;
using System.Data;

namespace WcfService
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the interface name "IService1" in both code and config file together.
    [ServiceContract]
    public interface IService
    {
        //[OperationContract]
        //string GetData(int value);

        //[OperationContract]
        //string GetCategories(int value);

        //[OperationContract]
        //string AddCategory(int value);

        //[OperationContract]
        //string GetItemsbyCategory(int value);

        [OperationContract]
        List<Top10> GetTop10(String CategoryId);

        //[OperationContract]
        //CompositeType GetDataUsingDataContract(CompositeType composite);

        // TODO: Add your service operations here
    }
    [DataContract]
    public class Top10
    {
        private String Name, Cat_Code, Description
           , Video_URL
           , Platform
           , Resolution
           , Price
           , Size
           , Upload_Date;
        [DataMember]
        public String Upload_Date1
        {
            get { return Upload_Date; }
            set { Upload_Date = value; }
        }
        [DataMember]
        public String Size1
        {
            get { return Size; }
            set { Size = value; }
        }
        [DataMember]
        public String Price1
        {
            get { return Price; }
            set { Price = value; }
        }
        [DataMember]
        public String Resolution1
        {
            get { return Resolution; }
            set { Resolution = value; }
        }
        [DataMember]
        public String Platform1
        {
            get { return Platform; }
            set { Platform = value; }
        }
        [DataMember]
        public String Video_URL1
        {
            get { return Video_URL; }
            set { Video_URL = value; }
        }
        [DataMember]
        public String Description1
        {
            get { return Description; }
            set { Description = value; }
        }
        [DataMember]
        public String Cat_Code1
        {
            get { return Cat_Code; }
            set { Cat_Code = value; }
        }
        [DataMember]
        public String Name1
        {
            get { return Name; }
            set { Name = value; }
        }

    }
   
}
